package com.zjj.lbw.ai;

import org.springframework.context.annotation.Description;
import org.springframework.stereotype.Component;

import java.time.LocalDate;
import java.util.function.Function;

@Component
@Description("获取当前日期")
public class DateTool implements Function<DateTool.Request, DateTool.Response> {

    public record Request() { }
    public record Response(LocalDate date) { }

    @Override
    public Response apply(Request request) {
        System.out.println("执行了获取当前日期工具");
        return new Response(LocalDate.now());
    }
}
